package com.example.springboot.mapper;

import com.example.springboot.entity.Sper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SperMapper {
    @Select("SELECT * FROM sper")
    List<Sper> findAll();
//  查专业名
    @Select("SELECT sper_name FROM sper where sper_code=#{sper_code}")
    String findSperName(Integer sper_code);
// 查院系代码
    @Select("SELECT department_id FROM sper where sper_code=#{sper_code}")
    Integer findDepartement_id(Integer sper_code);


    @Select("SELECT sper_name FROM sper ")
    List<String> sperName();
}
